package com.java.simple.designmode.simplefactory;

/**
 * @author zhoujunlin
 * @date 2023年04月13日 11:45
 * @desc
 */
public class SimplePizzaFactory {

    public static Pizza createPizza(String type) {
        Pizza pizza = null;
        switch (type) {
            case "Cheese":
                pizza = new CheesePizza();
                break;
            case "Clam":
                pizza = new ClamPizza();
                break;
            default:
                break;
        }
        return pizza;
    }

}
